package com.ease.component.controls.simplewizard {
    import mx.skins.halo.LinkButtonSkin;

    public class WizardPathLinkSkin extends LinkButtonSkin {
        public function WizardPathLinkSkin() {
            super();
        }

        override protected function updateDisplayList(w:Number, h:Number):void {
            super.updateDisplayList(w, h);

            var cornerRadius:Number = getStyle("cornerRadius");
            var rollOverColor:uint = getStyle("rollOverColor");
            var selectionColor:uint = getStyle("selectionColor");

            // Custom style for currently selected
            var toggleBackgroundColor:uint = getStyle("toggleBackgroundColor") || getStyle("themeColor");

            graphics.clear();

            switch (name) {
                case "upSkin":
                    // for a hit area.
                    drawRoundRect(0, 0, w, h, cornerRadius, 0, 0.0);
                    break;
                case "selectedUpSkin":
                case "selectedOverSkin":
                    drawRoundRect(0, 0, w, h, cornerRadius, toggleBackgroundColor, 1.0);
                    break;

                case "overSkin":
                    drawRoundRect(0, 0, w, h, cornerRadius, rollOverColor, 1.0);
                    break;

                case "selectedDownSkin":
                case "downSkin":
                    drawRoundRect(0, 0, w, h, cornerRadius, toggleBackgroundColor, 1.0);
                    break;

                case "selectedDisabledSkin":
                    // for a hit area.
                    drawRoundRect(0, 0, w, h, cornerRadius, toggleBackgroundColor, 0.2);
                    break;

                case "disabledSkin":
                    // for a hit area.
                    drawRoundRect(0, 0, w, h, cornerRadius, 0, 0.0);
                    break;
            }
        }
    }
}
